/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bitcore.mappings;

import java.util.Iterator;
import java.util.List;

/**
 *
 * @author julio jw0rmc
 */
public class TaxiController {
    TaxistaHelper th=new TaxistaHelper();
    
    public TaxiController(){
    }
    
  
    
    public Taxista testTaxi(String id){
    
     Taxista t=th.getTaxistaPorId(id);   
     if(id.equals("10000"))
     System.err.println("Devuelto por taxybyid ---->>>>>  id " + t.getId() + " " + t.getNombre() + "    " + t.getLatActual()); 
    
     
     
    return t;
    }
    
    public List<Taxista> getTaxiss(double miny, double maxy,double minx,double maxx){
    for(Taxista taxista: th.getTaxistasPorExtent(miny,maxy,minx,maxx))
     System.out.println("\n  id :> "+taxista.getId() +  "   nombre:> "+ taxista.getNombre());
     List<Taxista> lt=th.getTaxistasPorExtent(miny, maxy, minx, maxx);
    
        return lt;
    }
    
    
    
    public void updateTaxiPosicionById(String id,String lat,String lon){
    th.actualizaTaxistaById(id, Double.parseDouble(lat), Double.parseDouble(lon));
    }
    
}
